<template>
  <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" :height="200">
    <van-swipe-item v-for="banner in banners" :key="banner.acm">
      <a :href="banner.link">
        <img v-lazy="banner.image" />
      </a>
    </van-swipe-item>
  </van-swipe>
</template>

<script type="text/ecmascript-6">
import { Swipe, SwipeItem } from "vant";
export default {
  name: "HomeBanner",
  data() {
    return {};
  },
  components: { [Swipe.name]: Swipe, [SwipeItem.name]: SwipeItem },
  props: {
    banners: {
      type: Array,
      default() {
        return [];
      }
    },
  },
};
</script>

<style scoped>
img{
    width: 100%;
    height: 100%;
}
</style>
